// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity;

import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.*;
import com.nnee.p_fk.cls_ActivityEx;
import com.nnee.p_fk.cls_k;
import com.nnee.p_img.cls_c;
import com.nnee.p_pr.p_atom.cls_u;
import com.nnee.p_pr.cls_b;
import com.nnee.p_pr.p_prot.cls_d;
import com.nnee.p_pr.cls_v;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.LinkedList;

// Referenced classes of package com.nnee.p_pr.p_activity:
//            fg, ff, CustomListViewActivity, fe

public class cls_CustomTabActivity extends cls_ActivityEx
{

    public cls_CustomTabActivity()
    {
        f = 0;
        i = null;
        j = null;
        b = null;
        k = null;
        l = null;
        c = new cls_fg(this);
        d = new cls_ff(this);
    }

    static String a(cls_CustomTabActivity customtabactivity)
    {
        return customtabactivity.h;
    }

    static String a(cls_CustomTabActivity customtabactivity, String s1)
    {
        customtabactivity.h = s1;
        return s1;
    }

    static String a(String s1)
    {
        e = s1;
        return s1;
    }

    private void a(int i1, Object obj, String s1, String s2)
    {
        switch(i1)
        {
        case 312:
        	f = cls_v.a().c(s1);
        	break;
        	default:
        		break;
        }
       
    }

    public static void a(Context context, String s1)
    {
        Intent intent = new Intent(context, com.nnee.p_pr.p_activity.cls_CustomTabActivity.class);
        intent.putExtra("url", s1);
        context.startActivity(intent);
    }

    private void a(TextView textview, boolean flag)
    {
        if(textview != null)
        {
            float f1 = 1F;
            int i1 = Color.rgb(240, 240, 240);
            if(!flag)
            {
                f1 = -1F;
                i1 = Color.rgb(0, 0, 0);
            }
            textview.setShadowLayer(0.5F, 0F, f1, i1);
        }
    }

    static void a(cls_CustomTabActivity customtabactivity, cls_d d1)
    {
        customtabactivity.a(d1);
    }

    private void a(cls_u u1, boolean flag)
    {
        String s1;
        Intent intent;
        LinearLayout linearlayout;
        s1 = u1.U();
        intent = new Intent(this, com.nnee.p_pr.p_activity.cls_CustomListViewActivity.class);
        intent.putExtra(cls_CustomListViewActivity.a, u1.bh());
        intent.putExtra(com.nnee.p_pr.p_activity.cls_CustomListViewActivity.b, u1.be());
        intent.putExtra(com.nnee.p_pr.p_activity.cls_CustomListViewActivity.c, u1.U());
        linearlayout = t();
        TextView textview = (TextView)linearlayout.findViewById(0x7f0d0018);
        if(!flag)
            textview.setCompoundDrawablesWithIntrinsicBounds(0, 0, com.nnee.p_fk.cls_k.a(this).a(0x7f02011a), 0);
        textview.setText(s1);
        if(k == null) {return;} else{
        android.widget.TabHost.TabSpec tabspec = k.newTabSpec((new StringBuilder()).append(u1.bd()).append(u1.bh()).toString());
        Method method = null;
        Class class1 = tabspec.getClass();
        Class aclass[] = new Class[1];
        aclass[0] = android.view.View.class;
        try {
			method = class1.getMethod("setIndicator", aclass);
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NoSuchMethodException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
        method.setAccessible(true);
        Object aobj[] = new Object[1];
        aobj[0] = linearlayout;
        try {
			method.invoke(tabspec, aobj);
		} catch (IllegalArgumentException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InvocationTargetException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

        tabspec.setContent(intent);
        k.addTab(tabspec);
        }

    }

    private void a(cls_d d1)
    {
        if(d1 != null && d1.h != null)
        {
            i = d1;
            if(j == null)
            {
                j = (LinearLayout)findViewById(0x7f0d00a7);
                View view = LayoutInflater.from(this).inflate(0x7f030049, null, false);
                j.addView(view, 0);
            }
            h();
            s();
            r();
        }
    }

    static int b(cls_CustomTabActivity customtabactivity)
    {
        return customtabactivity.f;
    }

    private void b(boolean flag)
    {
        int i1 = 0;
        while(i1 < l.getTabCount()) 
        {
            View view = l.getChildTabViewAt(i1);
            if(view != null)
                a((TextView)view.findViewById(0x7f0d0018), flag);
            i1++;
        }
    }

    static String e()
    {
        return e;
    }

    private void f()
    {
        setTitle(getString(0x7f0a00bb));
        if(n != null)
        {
            n.setBackgroundDrawable(com.nnee.p_fk.cls_k.a(this).b(0x7f020134));
            n.setText(getString(0x7f0a00bc));
            n.setVisibility(0);
        }
        int i1 = com.nnee.p_img.cls_c.a(b, 8F);
        ((LinearLayout)findViewById(0x7f0d0005)).setPadding(0, 0, i1, 0);
    }

    private void g()
    {
        n = (TextView)findViewById(0x7f0d0009);
        m = (ProgressBar)findViewById(0x7f0d000c);
    }

    private void h()
    {
        k = (TabHost)findViewById(0x1020012);
        l = (TabWidget)findViewById(0x1020013);
        k.setup(getLocalActivityManager());
    }

    private void r()
    {
        if(n != null)
            n.setOnClickListener(c);
        if(k != null)
            k.setOnTabChangedListener(new cls_fe(this));
    }

    private void s()
    {
        if(i != null && i.h != null) {
        	int i1 = i.h.size();
            if(i1 > 0)
            {
                int j1 = 0;
                while(j1 < i1) 
                {
                    boolean flag;
                    if(j1 == i1 + -1)
                        flag = true;
                    else
                        flag = false;
                    a((cls_u)i.h.get(j1), flag);
                    j1++;
                }
                h = (new StringBuilder()).append(((cls_u)i.h.getFirst()).bd()).append(((cls_u)i.h.getFirst()).bh()).toString();
            }
        }

    }

    private LinearLayout t()
    {
        LinearLayout linearlayout = (LinearLayout)LayoutInflater.from(this).inflate(0x7f030006, l, false);
        linearlayout.setBackgroundDrawable(com.nnee.p_fk.cls_k.a(this).b(0x7f02005c));
        a((TextView)linearlayout.findViewById(0x7f0d0018), com.nnee.p_fk.cls_k.a(this).c());
        return linearlayout;
    }

    public void b()
    {
        n.setVisibility(8);
        m.setVisibility(0);
    }

    public void c()
    {
        n.setVisibility(0);
        m.setVisibility(8);
    }

    public void f_()
    {
        b(com.nnee.p_fk.cls_k.a(this).c());
    }

    public void onCreate(Bundle bundle)
    {
        super.onCreate(bundle);
        setContentView(0x7f030033);
        b = this;
        cls_v.a().a(d);
        if(getIntent() != null)
            g = getIntent().getStringExtra("url");
        g();
        f();
        a(312, null, g, null);
        b();
    }

    public void onDestroy()
    {
        super.onDestroy();
        e = "";
        if(m != null)
            m.setVisibility(8);
    }

    public void onResume()
    {
        super.onResume();
    }

    public static final String a = "url";
    private static String e = "";
    public Context b;
    android.view.View.OnClickListener c;
    cls_b d;
    private int f;
    private String g;
    private String h;
    private cls_d i;
    private LinearLayout j;
    private TabHost k;
    private TabWidget l;
    private ProgressBar m;
    private TextView n;

}
